<div class="course">
	<div class="title">我的课程列表</div>
	<div class="tool">
		<input placeholder="填写新的课程名称" type="text"  bind-input="{{'$Cache_new_course_name'}}" bind-value="{{$Cache_new_course_name}}" />
		<select bind-input="{{'$Cache_new_course_type'}}" bind-value="{{$Cache_new_course_type}}">
            <option value="">请选择课程类型</option>
            <option value="2">视频</option>
            <option value="1">日程安排</option>
        </select>
		<button event-click="{{'$Event.add_course'}}">创建新的课程</button>
	</div>
	<div class="list">
		{{#if $Cache_course_list.length}}
		{{#each $Cache_course_list}}
		<div class="item">
		<a class="icon-{{coursetype==1&&'jianpan'||'video'}}" event-click="{{'$Top.$Event.get_course_detail'}}">
			{{coursename}}
		</a>
		<div event-click="{{'$Top.$Event.remove_course'}}" class="icon-delete2"></div>	
		</div>
		{{/each}}
		{{#else}}
		<h3>您还没有任何课程</h3>
		{{/if}}
	</div>
</div>

<div class="course_detail {{$Cache_show_course_detail&&'focus'}}">
	<div event-click="{{'$Event.close_course_detail'}}" class="icon-jinru"></div>
	<div class="list">
	{{#if $Cache_now_show_course_type==1}}
	<div class="tool">
		<div id="course_date" class="input-append date">
            <input type="text" name="end" placeholder="请选择日期" disabled="true"></input>
            <span class="add-on">
                <i data-time-icon="icon-time" data-date-icon="icon-menu"></i>
            </span>
        </div>
		<input placeholder="请填写内容" style="display:block;margin-bottom:5px!important" type="text" bind-input="{{'$Cache_new_calendar_course_text'}}" bind-value="{{$Cache_new_calendar_course_text}}" />
		<button event-click="{{'$Event.add_course_detail'}}">添加</button>
	</div>
	{{#each $Cache_now_show_course_detail}}
	<div class="item">
		{{start+","+title}}
		<div event-click="{{'$Top.$Event.delete_calendar_one'}}" class="icon-delete2"></div>
	</div>
	{{/each}}
	{{#else}}
	<div class="tool">
		<input bind-input="{{'$Cache_new_video_path'}}" bind-value="{{$Cache_new_video_path}}" style="display:block;margin-bottom:5px!important" placeholder="视频路径" type="text" disabled="disabled" />
		<input bind-input="{{'$Cache_new_video_name'}}" bind-value="{{$Cache_new_video_name}}" style="display:block;margin-bottom:5px!important" placeholder="请填写内容" type="text" />
		<button onclick="document.getElementById('course_video').click()">选择文件</button>
		<button event-click="{{'$Event.add_course_new_video'}}">上传</button>
		<input event-change="{{'$Event.new_course_video_up'}}" type="file" style="display:none" id="course_video" />
	</div>
	{{#each $Cache_now_show_course_detail}}
		<a href="m.course_video.html?vid={{id}}&cid={{cid}}">
			<div class="item">
			{{date+','+name}}				
			<div event-click="{{'$Top.$Event.delete_video_one'}}" class="icon-delete2"></div>
			</div>
		</a>
	{{/each}}
	{{/if}}
	</div>
</div>